<template>
  <div class="BlogHome">
    <div class="BlogHeader">
      <div class="BlogHeaderBody">
        <div class="search">
          <input type="text" v-model="value">
          <div class="searchIcon" @click="jump">
            <img src="../../public/img/3.0-搜索.png" >
          </div>
        </div>
        <div class="BlogHeaderRight">
          <div class='nav'>
            <div>
                   <img src="../../public/img/主页.png">
              <p>主页</p>
            </div>
             <div>
                   <img src="../../public/img/登录.png">
              <p>登录</p>
            </div>
             <div>
              <img src="../../public/img/文章管理.png">
              <p>文章管理</p>
            </div>
            <div>
              <img src="../../public/img/消息.png">
              <p>消息管理</p>
            </div>
            <div>
              <img src="../../public/img/设置.png">
              <p>设置</p>
            </div>
          </div>
          <div class="headInfo">
            <div class="BlogHeaderInfoH"><img :src="$store.state.port"></div><span style="font-family: 微軟正黑體">{{$store.state.name}}</span>
          </div>
        </div>
      </div>

    </div>
      <router-view/>
  </div>
</template>

<script>
export default {
name: "BlogHome",
  data(){
     return {
          value:''
     }
  },
  methods:{
       jump(){
         this.$router.push({'name':'BlogList',query:{
               'value':this.value
           }})
       }
  }
}
</script>

<style scoped>
     .BlogHome{
       width: 100%;
     }
     .BlogHeader{
       background-color: #303030;
       padding-top: 10px;
       padding-bottom:10px;
       box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
     }
     .BlogHeaderBody{
       width: 1330px;
       margin: 0 auto;
       display: flex;
       justify-content: space-between;
     }
     .search{
       position: relative;
       width: 200px;
     }
     .search input{
       height: 100%;
       border-radius: 3px;
       width: 200px;
       border: #303030 1px solid;
       box-sizing: border-box;
     }
     .searchIcon{
       cursor: pointer;
         position: absolute;
        background-color: rgba(0,0,0,0.1);
         height: 100%;
         width: 30px;
        top: 0;
        right: 0;
       display: flex;
       justify-content: center;
       align-items: center;
     }
     .searchIcon img{
       width:16px;
     }
     .BlogHeaderRight{
       display: flex;
     }
     .BlogHeaderRight span{
       color: white;
     }

     .nav img{
       width: 17px;
     }
     .nav{
       margin-right: 30px;
       display:flex;
     }
     .nav>div{
       cursor: pointer;
       margin-right: 30px;
       display: flex;
       flex-direction: column;
       align-items: center;
       justify-content: center;
       font-size: 13px;
       font-family: 微軟正黑體;
       color: white;
     }
     .BlogHeaderRight>.headInfo{
       display: flex;
       align-items: center;
       padding-left: 10px;
       padding-right: 10px;
       border-left: 1px solid #4d545c;
       border-right: 1px solid #4d545c;
     }
     .BlogHeaderRight .BlogHeaderInfoH{
       height: 30px;
       width: 30px;
       background-color: white;
       border-radius: 50%;
       margin-right: 10px;
       overflow: hidden;
     }
     .BlogHeaderInfoH img{
       width: 100%;
     }

</style>